# 02-捕获多个异常.py
try:
    # print(name)
    # print(10/0)
    f = open('./test.txt','r')
# NameError 通常访问一个没有定义的变量或函数 发生异常类型
except (NameError,ZeroDivisionError,FileNotFoundError) as e:
    print(e) # e 异常
    f = open('./test.txt','w')
    f.write('123')